<template>
  <div>
    <button @click="$router.go(-1)">返回</button>
    <ul>
        <li v-for="(item,index) in list" :key="index">
            <img :src="item.pic" alt="">
            <p>{{ item.title }}</p>
        </li>
    </ul>
  </div>
</template>

<script>
    export default {
        data(){
            return{
                list: []
            }
        },
        mounted(){
            
            var id =  this.$route.query.id;
            console.log(id);
            this.axios.get('list.json').then(res => {
        //   console.log(res);
            this.list = res.data.result.filter(item =>{
            return item._id === id
              
          })
             })
        },
    }
</script>

<style lang="scss" scoped>
</style>